package com.heima.controller;

import com.heima.pojo.vo.PageResponse;
import com.heima.pojo.vo.VendingMachineVo;
import com.heima.service.ITbVmService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/vm-service/vm")
public class TbVmController {

    @Autowired
    private ITbVmService vmService;

    @GetMapping("/search")
    @ApiOperation("设备搜索")
    public PageResponse<VendingMachineVo> getByPage(@RequestParam Integer pageIndex,
                                                    @RequestParam Integer pageSize,
                                                    @RequestParam(required = false) String innerCode) {

        return vmService.getByPage(pageIndex, pageSize, innerCode);
    }


}
